import os
from os import path
from argparse import ArgumentParser
import shutil

import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
import numpy as np
from PIL import Image
from tqdm import tqdm

from inference.data.test_datasets import LongTestDataset, DAVISTestDataset, YouTubeVOSTestDataset
from inference.data.mask_mapper import MaskMapper
from model.network import XMem
from inference.inference_core import InferenceCore
import cv2

from inference.interact.interactive_utils import *
from inference.interact.interaction import *
from inference.interact.resource_manager import ResourceManager
from inference.interact.gui_utils import *
import copy

import tkinter as tk
from tkinter import filedialog
import colorsys
import random
import math
import pickle


# 從文件中讀取 list 對象
with open('./workspace/bbox_list.pkl', 'rb') as file:
    loaded_bbox_list = pickle.load(file)

# 輸出讀取的 list 以確認
print(loaded_bbox_list)